$m(function(args) {
    var $dom = $('#dialogSample-tempo').find('form');
    $('#type').selectmenu({
        width:300
    });
    TempoUtils.parserUi($dom, {});
    if(args && args.ID){
        var $dom = $('#dialogSample-tempo');
        $('#type').selectmenu("disable");
        $.ajax({
            url: contextPath + '/api/ai/sysconfig/samplecode/querySampleCodeById',
            method: 'POST',
            data: {
                id:args.ID,
            },
            success: function(result) {
                if(result){
                    $dom.find("input[name=id]").val(result.id);
                    $dom.find("input[name=name]").val(result.name);
                    $dom.find("select[name=type]").selectmenu('setValue', result.type);
                    $dom.find("textarea[name=sampleCode]").val(result.sampleCode);
                }
            }
        })
    }
})